 /* 
 * File:   cAnimatedCharacterViewer.h
 * Author: josep
 *
 * Created on 11 / desembre / 2010, 00:31
 */

#ifndef CANIMATEDVISIBLEOBJECT_H
#define	CANIMATEDVISIBLEOBJECT_H

#include "cPhysicalVisibleObject.h"
#include "cData.h"
#include "cAbstractAnimatedObject.h"


class cAnimatedVisibleObject: public cPhysicalVisibleObject, public cAbstractAnimatedObject {
public:
    cAnimatedVisibleObject();
    cAnimatedVisibleObject(const cAnimatedVisibleObject& orig);
    virtual ~cAnimatedVisibleObject();

    void InitFromIniFile(const char* pName, cData *Data,
                                    int posX=0, int posY=0,
                                    int width=0, int height=0);
    virtual void Draw();
protected:

private:
    void setFileImage(string iniValueLine, string &filename);
    void setNTiles(string iniValueLine);
    void setNFrameStates(string iniValueLine);
    void setNImagesFromState(string iniValueLine);
    void setImageSequencesVector(string iniValueLine);
    void setTileSize(string iniValueLine, int &tileSize);
};

#endif	/* CANIMATEDVISIBLEOBJECT_H */

